<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>育儿问答 - 育儿心得</title>
<meta name="keywords"
	content="育儿问答,育儿心得,专家答疑,育儿经验,专家在线,育儿知识,育儿常识,育儿百科,宝宝树">
<meta name="description"
	content="宝宝树育儿问答是最火爆最专业的育儿问答互动互助平台, 五分钟内有问必答。这里有育儿专家在线为您解答育儿难题。有无数父母在这里交流育儿心得和育儿经验，互帮互助，学习育儿知识和育儿经验。">


<script src="${pageContext.request.contextPath }/js/jquery.min.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet"
	href="${pageContext.request.contextPath}/css/style2.css">
</head>
<body id="mainbody">

<div id="babytree-body-wrapper" class="ask" style="background: none;">
		<div id="wisdom" class="wisdom-ask">
			<div class="wisdom-list-new">
				<!-- closed question -->
				<div class="title">
					<p style="font-size: 20px">汇聚几十万妈妈的经验和智慧，迅速解决育儿路上的困惑</p>
					<span
						style="float: left; margin-top: 20px; margin-right: 20px; margin-bottom: 20px; margin-left: 20px;">
						<input id="keyword_input" class="input_control" type="text">
						<button class="button" onclick="search()">搜索</button>
						<script type="text/javascript">
							function search(){
								var url="${pageContext.request.contextPath }/s?w="+$("#keyword_input").val();
								console.info(url);
								window.location.href=url;								
							}
						</script>
					</span>
					<style>
						.input_control {
							width: 200px;
							height: 20px
						}
						
						input[type="text"] {
							box-sizing: border-box;
							height: 30px;
							border-radius: 4px;
							border: 1px solid #c8cccf;
							color: #6a6f77;
							outline: 0;
						}
						
						.button {
							display: inline-block;
							zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */
							*display: inline;
							vertical-align: baseline;
							margin: 0 2px;
							outline: none;
							cursor: pointer;
							text-align: center;
							text-decoration: none;
							font: 14px/100% Arial, Helvetica, sans-serif;
							padding: .3em .3em .25em;
							text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
							-webkit-border-radius: .5em;
							-moz-border-radius: .5em;
							border-radius: .5em;
							-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
							-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
							box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
						}
						
						.button:hover {
							text-decoration: none;
						}
						
						.button:active {
							position: relative;
							top: 1px;
						}
						</style>
				</div>
		</div>
	</div>

	<div id="babytree-body-wrapper" class="ask" style="background: none;">

		<!-- 正文 -->
		<div id="wisdom" class="wisdom-ask">
			<div class="wisdom-body-wrapper wisdom-body-wrapper-ask">
				<div class="wisdom-section">
					<div class="section-main">
						<div class="question-list-nav">
							<ul>
								
								<!-- <li><a href="/ask/myqa__view~mlist,tab~B,cat_id~,age_id~">待解决</a></li> -->
								
								<li class="active"><a
									href="#">已解决</a></li>
									<!-- 
								<li><a
									href="/ask/myqa__view~mlist,tab~zero,cat_id~,age_id~"
									class="zero">零回答</a></li>
								<li><a
									href="/ask/myqa__view~mlist,tab~mobile,cat_id~,age_id~">手机提问</a></li> -->
							</ul>
						</div>
						<div class="question-list question-list-solved">
							<ul>
								<c:forEach items="${ data.items}" var="item">
								
								<li class="list-item"><!-- <span class="list-label-solved"></span> -->
									<p class="list-title">
										<a href="${pageContext.request.contextPath }/ask/detail/${item.md5 }" >${item.ask.ask_title }</a>
									</p>
									<p class="list-text">
										<span class="label">最佳回答：</span> <span class="excerpt">${item.anser.best.content }</span>
										<a href="${pageContext.request.contextPath }/ask/detail/${item.md5 }"
											class="full"  >更多»</a>
									</p>
									<p class="list-answer">
									
											<c:if test="${empty item.anser.best }">${item.anser.common.size() }
							</c:if>
							<c:if test="${!empty item.anser.best }">${item.anser.common.size()+1 }
							</c:if>
							
									回答</p></li>
									</c:forEach>
							</ul>
							
							<!-- 翻页 start -->
							<div>
								<div class="pagejump">
									<!-- 不是第一页，就有上一页 -->
									<c:if test="${data.pageBean.currentPage ne 1 }">
										<a href="${pageContext.request.contextPath }/s?w=${data.keyword}&p=1">首页</a>
										<a href="${pageContext.request.contextPath }/s?w=${data.keyword}&p=${data.pageBean.currentPage-1}">上翻页</a>
									</c:if>
									<!-- 不是最后一页，就有下一页 -->
									<c:if test="${ data.pageBean.currentPage ne data.pageBean.pageSize }">
										<a href="${pageContext.request.contextPath }/s?w=${data.keyword}&p=${data.pageBean.currentPage+1}">下翻页</a>
									</c:if>
									<span
										class="page-number">页数 : ${data.pageBean.currentPage }/${data.pageBean.pageSize }</span> 															
								</div>
							</div>
							<!-- 翻页 end -->
						</div>
					</div>



				</div>
			</div>

		</div>


		<div id="body-wrapper-bottom">
			<div id="body-wrapper-bottom-bg"></div>
		</div>
	</div>



</body>
</html>